webshot¥Ñ¥Ã¥±©`¥¸¤òʹ¤Ã¤Æ¡¢R¤Ç¥¦¥§¥Ö¥Ú©`¥¸¤Î¥¹¥¯¥ê©`¥ó¥·¥ç¥Ã¥È¤ÈÈ¡¤ë¤³¤È¤¬¤Ç¤¤ë¡£
webshot¥Ñ¥Ã¥±©`¥¸¤Ç¤ÏPhantomJS¤¬±ØÒª¤Ê¤Î¤Ç¡¢Í¬•r¤Ë¥¤¥ó¥¹¥È©`¥ë¤·¤Æ¤ª¤¯¡£
install.packages("webshot")
install_phantomjs()
webshotévÊý¤Î¥Ø¥ë¥×¤òÒŠ¤ë¤È¶à¤¯¤ÎÒýÊý¤¬¤¢¤ë¤¬¡¢ ±ØÒª×îСÏޤʤΤϥ¹¥¯¥ê©`¥ó¥·¥ç¥Ã¥È¤òÈ¡¤ê¤¿¤¤¥¦¥§¥Ö¤Î¥¢¥É¥ì¥¹url¡£
webshot(url = NULL, file = "webshot.png", vwidth = 992, vheight = 744,
cliprect = NULL, selector = NULL, expand = NULL, delay = 0.2,
zoom = 1, eval = NULL)
url : ¥¹¥¯¥ê©`¥ó¥·¥ç¥Ã¥È¤òÈ¡¤ê¤¿¤¤¥¦¥§¥Ö¤ÎURL¡¢Ñ}ÊýURL¤Î¥Ù¥¯¥È¥ë¤â¿É¡£file : ¥¹¥¯¥ê©`¥ó¥·¥ç¥Ã¥È¤Î¥Õ¥¡¥¤¥ë¤ÎÃûǰ(¥Ç¥Õ¥©¥ë¥È¤Ïwebshot.png)¡¢PNGÒÔÍâ¤Ë¤âPDF¤ÈJPEG¤¬Ê¹¤¨¤ë¡£delay : ¥¦¥§¥Ö¥Ú©`¥¸¤òé_¤¤¤Æ¤«¤é¥¹¥¯¥ê©`¥ó¥·¥ç¥Ã¥È¤òÈ¡¤ë¤Þ¤Ç¤ÎßWÑÓ•rég¡£getwd()¤Ç±íʾ¤µ¤ì¤ë×÷˜I¥Õ¥©¥ë¥ÀÄÚ¤Ëwebshot.png¤È¤¤¤¦¥Õ¥¡¥¤¥ëÃû¤Ç¥¹¥¯¥ê©`¥ó¥·¥ç¥Ã¥È¤¬±£´æ¤µ¤ì¤ë¡£
library(webshot)
url <- "http://www.pu-hiroshima.ac.jp/~ttetsuji/"
webshot(url)
cliprect="viewport"¤È¤¹¤ë¤È¡¢vwidth¤Çvheight¤ÇÖ¸¶¨¤·¤¿·ù¤È¸ß¤µ¤Ç¥¹¥¯¥ê©`¥ó¥·¥ç¥Ã¥È¤ò¤È¤ë¡£
webshot(url,cliprect="viewport",vwidth=800,vheight=100)
cliprect="c(top,left,width,height)"¤È¤¹¤ë¤È¡¢ÉϤ«¤étop×󤫤éleft¤ÎλÖ䫤顢·ùwidth¤Ç¸ß¤µheight¤Î¹ ‡ì¤Ç¥¹¥¯¥ê©`¥ó¥·¥ç¥Ã¥È¤ò¤È¤ë¡£
webshot(url,cliprect=c(550,150,600,300))